#ifndef DEFINITIONS_H
#define	DEFINITIONS_H
#include <cyg/hal/hal_arch.h>

//Stack and thread definitions
#define INIT_PRIORITY		19
#define LED_PRIORITY		18

//Stack thread sizes
#define INIT_STACK_SIZE		CYGNUM_HAL_STACK_SIZE_TYPICAL
#define LED_STACK_SIZE		CYGNUM_HAL_STACK_SIZE_MINIMUM

#define KEYPAD_C1	CYGHWR_HAL_STM32_PIN_IN(C, 6, PULLUP)
#define KEYPAD_C2	CYGHWR_HAL_STM32_PIN_IN(C, 7, PULLUP)
#define KEYPAD_C3	CYGHWR_HAL_STM32_PIN_IN(C, 8, PULLUP)
#define KEYPAD_C4	CYGHWR_HAL_STM32_PIN_IN(C, 9, PULLUP)
<<<<<<< HEAD
#define KEYPAD_R1	CYGHWR_HAL_STM32_PIN_OUT(C, 10, PUSHPULL, NONE, 2MHZ)
#define KEYPAD_R2	CYGHWR_HAL_STM32_PIN_OUT(C, 11, PUSHPULL, NONE, 2MHZ)
#define KEYPAD_R3	CYGHWR_HAL_STM32_PIN_OUT(C, 12, PUSHPULL, NONE, 2MHZ)
#define KEYPAD_R4	CYGHWR_HAL_STM32_PIN_OUT(C, 13, PUSHPULL, NONE, 2MHZ)
=======
#define KEYPAD_R1	CYGHWR_HAL_STM32_PIN_OUT(C,  10, PUSHPULL, NONE, 2MHZ)
#define KEYPAD_R2	CYGHWR_HAL_STM32_PIN_OUT(C,  11, PUSHPULL, NONE, 2MHZ)
#define KEYPAD_R3	CYGHWR_HAL_STM32_PIN_OUT(C,  12, PUSHPULL, NONE, 2MHZ)
#define KEYPAD_R4	CYGHWR_HAL_STM32_PIN_OUT(C,  13, PUSHPULL, NONE, 2MHZ)
>>>>>>> 9a7bf6d4a318dfff7ecc05736f15373019ec73ae


#define OTYPE OPENDRAIN

#define LCD_RS	CYGHWR_HAL_STM32_PIN_OUT(B, 10, OTYPE    , NONE, 2MHZ)
#define LCD_RW	CYGHWR_HAL_STM32_PIN_OUT(B, 14, OTYPE    , NONE, 2MHZ)
#define LCD_E	CYGHWR_HAL_STM32_PIN_OUT(B, 12, PUSHPULL , NONE, 2MHZ)
#define LCD_DB0	CYGHWR_HAL_STM32_PIN_OUT(E,  8, OTYPE    , NONE, 2MHZ)
#define LCD_DB1	CYGHWR_HAL_STM32_PIN_OUT(E,  9, OTYPE    , NONE, 2MHZ)
#define LCD_DB2	CYGHWR_HAL_STM32_PIN_OUT(E, 10, OTYPE    , NONE, 2MHZ)
#define LCD_DB3	CYGHWR_HAL_STM32_PIN_OUT(E, 11, OTYPE    , NONE, 2MHZ)
#define LCD_DB4 CYGHWR_HAL_STM32_PIN_OUT(E, 12, OTYPE    , NONE, 2MHZ)
#define LCD_DB5 CYGHWR_HAL_STM32_PIN_OUT(E, 13, OTYPE    , NONE, 2MHZ)
#define LCD_DB6 CYGHWR_HAL_STM32_PIN_OUT(E, 14, OTYPE    , NONE, 2MHZ)
#define LCD_DB7 CYGHWR_HAL_STM32_PIN_OUT(E, 15, OTYPE    , NONE, 2MHZ)

#endif	/* DEFINITIONS_H */

